package com.foreknow.service.impl;

import com.foreknow.dao.EmpDao;
import com.foreknow.model.Emp;
import com.foreknow.service.EmpService;

import java.sql.SQLException;

public class EmpServiceImpl implements EmpService {
    private EmpDao empDao;

    public void setEmpDao(EmpDao empDao) {
        this.empDao = empDao;
    }

    @Override
    public Emp[] getQueryAll(){
        Emp[] emps = null;
        try {
            //添加
            //修改
            //删除
            //提交事务 commit
             emps = empDao.getQueryAll();
        } catch (SQLException e) {
            e.printStackTrace();
            //回滚
        }
        return emps;
    }
}
